package com.company.site.wenjuan;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.company.site.mode.wenjuan.Player;
import com.company.site.mode.wenjuan.Question;


@Service
public class WenjuanService {
	
	@Resource
	WenjuanMapper wenjuanMapper;

	public List<Player> findPlayerInfo(Player player) {
		return wenjuanMapper.findPlayerInfo(player);
	}

	public Player getPlayerByOpenid(String openid) {
		return wenjuanMapper.getPlayerByOpenid(openid);
	}

	public List<Question> getQuestions() {
		return wenjuanMapper.getQuestions();
	}

	public Long addPlayer(Player newPlayer) {
		return wenjuanMapper.addPlayer(newPlayer);
	}

	public void submitRightCount(Player player) {
		wenjuanMapper.submitRightCount(player);
	}

	public Player getPlayerById(Long id) {
		return wenjuanMapper.getPlayerById(id);
	}

	public Integer countPlayers() {
		return wenjuanMapper.countPlayers();
	}
}
